#  This material contains proprietary software of Entropic Speech, Inc.  
#  Any reproduction, distribution, or publication without the the prior   
#  written permission of Entropic Speech, Inc. is strictly prohibited.
#  Any public distribution of copies of this work authorized in writing by
#  Entropic Speech, Inc. must bear the notice:
#
#      "Copyright (c) 1987 Entropic Speech, Inc.; All rights reserved"
#
#  @(#)Makefile	1.4	11/25/87 ESI

CFLAGS = -g $(PROGCFLAGS)

OBJS = encode.o buffer.o cntbits.o history.o pkbits.o

SRCS = encode.c buffer.c cntbits.c history.c pkbits.c

encode: $(OBJS) $(SPSLIB)
	cc $(CFLAGS) $(OBJS) $(SPSLIB) -lm -o encode

encode.o:	$(SINC)/esps.h $(SINC)/anafea.h $(SINCL)/encode.h $(SINC)/fea.h $(SINCL)/fea2kb.h $(SINCL)/feahuff.h $(SINCL)/feaqhist.h $(SINCL)/feaquant.h
buffer.o:	$(SINC)/esps.h $(SINC)/anafea.h $(SINCL)/encode.h $(SINC)/fea.h
cntbits.o:	$(SINC)/esps.h $(SINC)/anafea.h $(SINCL)/encode.h $(SINC)/fea.h $(SINCL)/fea2kb.h $(SINCL)/feaqhist.h $(SINCL)/feaquant.h
history.o:	$(SINC)/esps.h $(SINC)/anafea.h $(SINCL)/encode.h $(SINC)/fea.h $(SINCL)/feaqhist.h
pkbits.o:	$(SINC)/esps.h $(SINC)/fea.h $(SINCL)/fea2kb.h

install: encode
	-strip encode
	-mv -f $(BINDIR)/encode $(OLDBIN)/encode
	-chmod $(PROGMOD) $(OLDBIN)/encode
	mv encode $(BINDIR)/encode
	chmod $(PROGMOD) $(BINDIR)/encode
	-diffmk $(MANDIR)/man1/encode.1 encode.1 man.diff
	@echo diffmked man page left in man.diff
	cp encode.1 $(MANDIR)/man1/encode.1
	chmod $(MANMOD) $(MANDIR)/man1/encode.1

clean:	
	rm -f $(OBJS) encode 
	
lint:	$(SRCS)
	$(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIB) -lm > lint
